using LockStepFrame;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ServerMain : MonoBehaviour
{
    [SerializeField]
    string ip = "127.0.0.1";
    [SerializeField]
    int port = 8900;

    private void Awake()
    {
        ServerNetManager.Instance.Awake(()=>new KofServer(),
            () => new ClientSessionEventBridge(),ip,port);
        Debug.Log($"[SNetHandle]:{ip} => {port}");
    }

    // Update is called once per frame
    void Update()
    {
        ServerNetManager.Instance.Update();
    }

    private void OnDestroy()
    {
        ServerNetManager.Instance.Destroy();
    }
}
